##################################################
## Author: Stephanie L. DeMora, Christian Lindke, Jenn Merolla, and Laura Stephenson
## Project: "Ready for a Woman President?" Paper Cleaning File
## Date: September 25th 2020
##################################################



# Treatment Check:
table(df$UCR116_treat)
df$UCR116_treat <- as.character(df$UCR116_treat)
df$TREAT <- car::recode(df$UCR116_treat, "1 = 'Control'; 2 = 'Personal'; 3 = 'Neighbor'; 4 = 'Harder Win'; else = NA")
df$TREAT <- as.factor(df$TREAT)

# GENDER INTERACTIONS:
df$GENDER <- car::recode(df$gender, "1=0;2=1;else=NA")
df$GENDER <- as.numeric(df$GENDER)


# PARTY
df$pid7
df$party <- car::recode(df$pid7,"1:2=1;3:5=0;else=99")
df$PARTISANSHIP <- as.numeric(df$pid7)
df$PARTISANSHIP <- car::recode(df$PARTISANSHIP,"1:2='Democrat';3:5='Independent';6:7='Republican';else=NA")

df$Gender_Vote <- car::recode(df$UCR120, "1=0;2=0;4=0;6=0;7=0;10=0; 3=1;5=1;8=1;9=1; else=NA")
table(df$UCR120)
table(df$Gender_Vote)

df$Harris_Vote <- car::recode(df$UCR120, "1=0;2=0;4=0;6=0;7=0;10=0; 3=0;5=1;8=0;9=0; else=NA")
df$Warren_Vote <- car::recode(df$UCR120, "1=0;2=0;4=0;6=0;7=0;10=0; 3=1;5=0;8=0;9=0; else=NA")


df$Surprised <- as.numeric(df$UCR117)
df$Surprised <- car::recode(df$Surprised, "1=1;2=0;else=NA")

df$EVAL <- as.numeric(df$UCR118)
df$EVAL <- car::recode(df$EVAL, "1=1;2=0;else=NA")

df1<-subset(df, df$party!= 99)
